package com.eudon.design_pattern.structural.decorator;

/**
 * @author eudon
 * @description 缓存读取输入流
 * @date 2025/9/2
 * @email syd19970616@gmail.com
 * @address <a href="https://gitee.com/eudon">Gitee</a>
 */
public class BufferInputStream implements InputStream {
    private final InputStream decorator;

    public BufferInputStream(InputStream decorator) {
        this.decorator = decorator;
    }

    @Override
    public String read() {
        System.out.println("支持缓存读取");
        return decorator.read();
    }
}
